package com.rt.system.service.impl;

import java.util.List;
import com.rt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rt.system.mapper.RtDifficultyLogMainMapper;
import com.rt.system.domain.RtDifficultyLogMain;
import com.rt.system.service.IRtDifficultyLogMainService;

/**
 * 难易度调整日志（主）Service业务层处理
 * 
 * @author Yg
 * @date 2022-04-21
 */
@Service
public class RtDifficultyLogMainServiceImpl implements IRtDifficultyLogMainService 
{
    @Autowired
    private RtDifficultyLogMainMapper rtDifficultyLogMainMapper;

    /**
     * 查询难易度调整日志（主）
     * 
     * @param id 难易度调整日志（主）主键
     * @return 难易度调整日志（主）
     */
    @Override
    public RtDifficultyLogMain selectRtDifficultyLogMainById(Long id)
    {
        return rtDifficultyLogMainMapper.selectRtDifficultyLogMainById(id);
    }

    /**
     * 查询难易度调整日志（主）列表
     * 
     * @param rtDifficultyLogMain 难易度调整日志（主）
     * @return 难易度调整日志（主）
     */
    @Override
    public List<RtDifficultyLogMain> selectRtDifficultyLogMainList(RtDifficultyLogMain rtDifficultyLogMain)
    {
        return rtDifficultyLogMainMapper.selectRtDifficultyLogMainList(rtDifficultyLogMain);
    }

    /**
     * 新增难易度调整日志（主）
     * 
     * @param rtDifficultyLogMain 难易度调整日志（主）
     * @return 结果
     */
    @Override
    public int insertRtDifficultyLogMain(RtDifficultyLogMain rtDifficultyLogMain)
    {
        return rtDifficultyLogMainMapper.insertRtDifficultyLogMain(rtDifficultyLogMain);
    }

    /**
     * 修改难易度调整日志（主）
     * 
     * @param rtDifficultyLogMain 难易度调整日志（主）
     * @return 结果
     */
    @Override
    public int updateRtDifficultyLogMain(RtDifficultyLogMain rtDifficultyLogMain)
    {
        rtDifficultyLogMain.setUpdateTime(DateUtils.getNowDate());
        return rtDifficultyLogMainMapper.updateRtDifficultyLogMain(rtDifficultyLogMain);
    }

    /**
     * 批量删除难易度调整日志（主）
     * 
     * @param ids 需要删除的难易度调整日志（主）主键
     * @return 结果
     */
    @Override
    public int deleteRtDifficultyLogMainByIds(Long[] ids)
    {
        return rtDifficultyLogMainMapper.deleteRtDifficultyLogMainByIds(ids);
    }

    /**
     * 删除难易度调整日志（主）信息
     * 
     * @param id 难易度调整日志（主）主键
     * @return 结果
     */
    @Override
    public int deleteRtDifficultyLogMainById(Long id)
    {
        return rtDifficultyLogMainMapper.deleteRtDifficultyLogMainById(id);
    }
}
